//
//  CCMMineOrderViewCell.swift
//  CCMoney_swift
//
//  Created by JKHuang on 2018/11/27.
//  Copyright © 2018 JKHuang. All rights reserved.
//

import UIKit

class CCMMineOrderViewCell: UITableViewCell {

    fileprivate lazy var titleLabel:UILabel = {
        let label = UILabel()
        label.font = UIFont.systemFont(ofSize: 14)
        label.textColor = UIColor.white
        return label
    }()
    
    fileprivate lazy var arrowButton:UIButton = {
        let button = UIButton()
        button.setImage(UIImage(named: "箭头_icon"), for: .normal)
        return button
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = UIColor.hex(0x2D3554)
        setUI()
        self.titleLabel.text = "我的订单"
    }
    
    required init?(coder aDecoder: NSCoder) {
        
        fatalError("init(coder:) has not been implemented")
    }
}

extension CCMMineOrderViewCell{
    
    fileprivate func setUI(){
        self.contentView.addSubview(self.titleLabel)
        self.contentView.addSubview(self.arrowButton)
        
        self.titleLabel.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.contentView)
            make.leading.equalTo(self.contentView).offset(15)
        }
        
        self.arrowButton.snp.makeConstraints { (make) in
            make.trailing.equalTo(self.contentView).offset(-16)
            make.centerY.equalTo(self.titleLabel)
        }
    }
}
